package com.dnb.webmash.playmaker.client;

import java.util.ArrayList;
import java.util.LinkedHashSet;
import com.dnb.webmash.playmaker.shared.LoginInfo;
import com.dnb.webmash.playmaker.shared.MediaType;
import com.dnb.webmash.playmaker.shared.PlayerConfig;
import com.dnb.webmash.playmaker.shared.PlayerType;
import com.dnb.webmash.playmaker.shared.PlaylistItem;
import com.google.appengine.api.datastore.Text;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("webplaylist")
public interface WebPlaylistService extends RemoteService {

	PlaylistItem requestPlaylist(String input, int levels, Boolean mediaOnly,
			String requestID, Text docText, ArrayList<MediaType> allowedMedia)
			throws IllegalArgumentException;
	
	PlaylistItem requestLoadCurUserPls();
	
	ArrayList<MediaType> requestAllPlayTypes();
	
	Boolean requestSaveUserPls(LinkedHashSet<PlaylistItem> toSave,
			LoginInfo ownersLogin);

	PlayerConfig requestDefaultConfigs(PlayerType type);

	PlayerConfig requestLoadUserConfigs(PlayerType type);

	PlaylistItem requestLoadGlobalPls();

	Boolean storeIfNotAlready(ArrayList<PlaylistItem> plsToStore, String owner);

	ArrayList<PlaylistItem> requestLoadPls(ArrayList<String> request);
	
	boolean requestCreateNewMedia(MediaType nT);

	Text requestDoc(String reqURL);

	PlaylistItem resumeRecursion(PlaylistItem empty, Boolean mediaOnly,
			String requestID, Text docText, ArrayList<MediaType> allowedMedia);
}
